///*
// * To change this license header, choose License Headers in Project Properties.
// * To change this template file, choose Tools | Templates
// * and open the template in the editor.
// */
//package company.search.beans;
//
//import company.globalEvents.PaidCompanyProductEvent;
//import entities.Candidate;
//import entities.Company;
//import entities.CompanyAdquiredProfile;
//import javax.inject.Named;
//import javax.enterprise.context.SessionScoped;
//import java.io.Serializable;
//import java.util.HashMap;
//import java.util.Map;
//import javax.annotation.PostConstruct;
//import javax.enterprise.event.Observes;
//import javax.inject.Inject;
//import qualifiers.CreatedEntityEvent;
//import qualifiers.LoggedIn;
//
///**
// *
// * @author damfercer
// */
//@Named(value = "adquiredCandidatesBean")
//@SessionScoped
//public class AdquiredCandidatesBean implements Serializable {
//
//    @Inject
//    @LoggedIn
//    Company company;
//    private Map<Integer,CompanyAdquiredProfile> candidateAdquiredProfileMapper;
//    /**
//     * Creates a new instance of AdquiredCandidatesBean
//     */
//    public AdquiredCandidatesBean() {
//    }
//    
//    @PostConstruct
//    public void init(){
//        candidateAdquiredProfileMapper=new HashMap<Integer, CompanyAdquiredProfile>();
//        for(CompanyAdquiredProfile profile: company.getCompanyAdquiredProfileList()){
//            candidateAdquiredProfileMapper.put(profile.getCandidate().getIdCandidate(), profile);
//        }
//    }
//    
//    public Boolean isAdquired(Candidate c){
//        return candidateAdquiredProfileMapper.get(c.getIdCandidate())!=null;
//    }
//    
//    public void onNewAdquiredProfile(@Observes @CreatedEntityEvent CompanyAdquiredProfile profile){
//        candidateAdquiredProfileMapper.put(profile.getCandidate().getIdCandidate(), profile);
//    }
//
//    /**
//     * @return the candidateAdquiredProfileIdMapper
//     */
//    public Map<Integer,CompanyAdquiredProfile> getCandidateAdquiredProfileIdMapper() {
//        return candidateAdquiredProfileMapper;
//    }
//
//    /**
//     * @param candidateAdquiredProfileIdMapper the candidateAdquiredProfileIdMapper to set
//     */
//    public void setCandidateAdquiredProfileIdMapper(Map<Integer,CompanyAdquiredProfile> candidateAdquiredProfileIdMapper) {
//        this.candidateAdquiredProfileMapper = candidateAdquiredProfileIdMapper;
//    }
//    
//}
